const isLogin = () => !!localStorage.getItem('token')
const getToken = () => localStorage.getItem('token')
const getRole = () => localStorage.getItem('role')
// 移除用户信息(相关缓存，vuex的缓存)
const removeUserInfo = () => {
  localStorage.removeItem('token')
  localStorage.removeItem('userInfo')
  localStorage.removeItem('role')
}

export {
  isLogin,
  getToken,
  removeUserInfo,
  getRole
}
